<?php
include('../config.php');
include(PUNG_ROOT . '/admin/header.php');
include(PUNG_ROOT . '/system/class/gd.class.php');

$adminmenu = array(
LANG_091 => 'blocks.php',
LANG_092 => 'addblock.php'
);

if(isset($_POST['submit']))
{
	$db -> db_query("INSERT INTO " . DB_PREFIX . "blocks 
	(title, content, type, position, height, visible, owner) VALUES (
	'" . addslashes($_POST['title']) . "',
	'" . addslashes($_POST['content']) . "',
	'" . $_POST['type'] . "',
	'left',
	'0',
	'no',
	'system')");
	
	redirect_with_message('msg', 'LANG_121', 'blocks.php');
}

include(PUNG_ROOT . '/admin/head.php');
?>

<h3><?php print LANG_094; ?></h3>

<form action="" method="post">
<table width="100%">
<tr>
	<td width="120"><strong><?php print LANG_113; ?>:</strong></td>
	<td><input type="text" style="width: 350px;" name="title" /></td>
</tr>
<tr>
	<td valign="top"><strong><?php print LANG_114; ?>:</strong></td>
	<td><textarea style="width: 350px; height: 200px" name="content"></textarea></td>
</tr>
<tr>
	<td valign="top"><strong><?php print LANG_115; ?>:</strong></td>
	<td>
	<input type="radio" value="plain" name="type" checked="checked" /> <?php print LANG_117; ?><br />
	<input type="radio" value="php" name="type" /> <?php print LANG_116; ?>
	</td>
</tr>
</table>
<br />
<input type="submit" name="submit" class="form_button" value="<?php print LANG_120; ?>" />
</form>

<?php
include(PUNG_ROOT . '/admin/footer.php');
?>